import React from 'react';
// import FixedBottom from 'components/FixedBottom';
import './index.less';

export default class Navbar extends React.Component {

    toGo = (url) => {
        if (url) {
            if (Date.now() / 1000 - WPT.loginTime > 43200) {
                WPT.redirect(url);
            } else {
                WPT.showPageNoAnimation(url);
            }
        }
    }

    render() {
        return (
            <div className="component-navbar-wrapper">
                <div className="navbar-inner">
                    <div className={`navbar-item ${this.props.active === '0' ? 'active' : ''}`} onClick={() => this.toGo('/')}>首页</div>
                    <div className={`navbar-item ${this.props.active === '1' ? 'active' : ''}`} onClick={() => this.toGo('/career/index')}>我的</div>
                </div>
            </div>
        );
    }
}